from stanfordcorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP(r'/Users/yuronan/develop/code/python/stanford-corenlp-4.3.2', lang='en')
f_pos = open('./data/hownet_pos.txt', 'w+')
f_neg = open('./data/hownet_neg.txt', 'w+')
def disProcess():
    for line in set(open('./data/hownet_pos_new.txt')):
        print(line.split(','))
        if line:
            f_pos.write(line.strip().split(',')[0] + ',' + line.strip().split(',')[1] + ',pos,h' + '\n')
    for line in set(open('./data/hownet_neg_new.txt')):
        if line:
            f_neg.write(line.strip().split(',')[0] + ',' + line.strip().split(',')[1] + ',neg,h' + '\n')
    f_neg.close()
    f_pos.close()
def allProcess():
    f_neg = open('./data/hownet.txt', 'w+')
    for line in set(open('./data/hownet_pos_new.txt')):
        print(line.split(','))
        if line:
            f_pos.write(line.strip().split(',')[0] + ',' + line.strip().split(',')[1] + ',pos,h' + '\n')
    for line in set(open('./data/hownet_neg_new.txt')):
        if line:
            f_neg.write(line.strip().split(',')[0] + ',' + line.strip().split(',')[1] + ',neg,h' + '\n')
    f_neg.close()
    f_pos.close()